// FormMainChildDlg12Sub03_01.cpp : implementation file
//

#include "stdafx.h"
#include "diabetes.h"
#include "FormMainChildDlg12Sub03_01.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFormMainChildDlg12Sub03_01 dialog


CFormMainChildDlg12Sub03_01::CFormMainChildDlg12Sub03_01(CString sz_title,CWnd* pParent /*=NULL*/)
	: CDialog(CFormMainChildDlg12Sub03_01::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFormMainChildDlg12Sub03_01)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	this->m_sz_title = sz_title;
}


void CFormMainChildDlg12Sub03_01::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFormMainChildDlg12Sub03_01)
	DDX_Control(pDX, IDC_TAB_WEB, m_sub_frame_tab);
	DDX_Control(pDX, IDC_STATIC_TITLE, m_title);
	DDX_Control(pDX, IDC_STATIC_19, m_19);
	DDX_Control(pDX, IDC_STATIC_18, m_18);
	DDX_Control(pDX, IDC_STATIC_17, m_17);
	DDX_Control(pDX, IDC_STATIC_16, m_16);
	DDX_Control(pDX, IDC_STATIC_15, m_15);
	DDX_Control(pDX, IDC_STATIC_14, m_14);
	DDX_Control(pDX, IDC_STATIC_13, m_13);
	DDX_Control(pDX, IDC_STATIC_12, m_12);
	DDX_Control(pDX, IDC_STATIC_11, m_11);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFormMainChildDlg12Sub03_01, CDialog)
	//{{AFX_MSG_MAP(CFormMainChildDlg12Sub03_01)
	ON_BN_CLICKED(IDC_STATIC_11, OnStatic11)
	ON_BN_CLICKED(IDC_STATIC_12, OnStatic12)
	ON_BN_CLICKED(IDC_STATIC_13, OnStatic13)
	ON_BN_CLICKED(IDC_STATIC_14, OnStatic14)
	ON_BN_CLICKED(IDC_STATIC_15, OnStatic15)
	ON_BN_CLICKED(IDC_STATIC_16, OnStatic16)
	ON_BN_CLICKED(IDC_STATIC_17, OnStatic17)
	ON_BN_CLICKED(IDC_STATIC_18, OnStatic18)
	ON_BN_CLICKED(IDC_STATIC_19, OnStatic19)
	ON_WM_LBUTTONDOWN()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFormMainChildDlg12Sub03_01 message handlers

void CFormMainChildDlg12Sub03_01::OnStatic11() 
{
	ImageButton_AllNormal();
	m_11.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(0);
}

void CFormMainChildDlg12Sub03_01::OnStatic12() 
{
	ImageButton_AllNormal();
	m_12.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(1);
}

void CFormMainChildDlg12Sub03_01::OnStatic13() 
{
	ImageButton_AllNormal();
	m_13.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(2);
}

void CFormMainChildDlg12Sub03_01::OnStatic14() 
{
	ImageButton_AllNormal();
	m_14.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(3);
}

void CFormMainChildDlg12Sub03_01::OnStatic15() 
{
	ImageButton_AllNormal();
	m_15.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(4);
}

void CFormMainChildDlg12Sub03_01::OnStatic16() 
{
	ImageButton_AllNormal();
	m_16.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(5);
}

void CFormMainChildDlg12Sub03_01::OnStatic17() 
{
	ImageButton_AllNormal();
	m_17.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(6);
}


void CFormMainChildDlg12Sub03_01::OnStatic18() 
{
	ImageButton_AllNormal();
	m_18.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(7);
}

void CFormMainChildDlg12Sub03_01::OnStatic19() 
{
	ImageButton_AllNormal();
	m_19.SetPressed(TRUE);
	m_sub_frame_tab.SetCurSel(8);
}

BOOL CFormMainChildDlg12Sub03_01::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	//
	ImageButton_Initial();
	//
	::SetShapeWindowSkin(this->m_hWnd, "IDD_FORM_MAIN_CHILD_DLG12_SUB03_01");
	this->m_title.SetWindowText(this->m_sz_title);
	//
	m_sub_frame_tab.AddPage("m_dlg0101",&m_dlg0101,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_01);
	m_sub_frame_tab.AddPage("m_dlg0102",&m_dlg0102,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_02);
	m_sub_frame_tab.AddPage("m_dlg0103",&m_dlg0103,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_03);
	m_sub_frame_tab.AddPage("m_dlg0104",&m_dlg0104,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_04);
	m_sub_frame_tab.AddPage("m_dlg0105",&m_dlg0105,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_05);
	m_sub_frame_tab.AddPage("m_dlg0106",&m_dlg0106,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_06);
	m_sub_frame_tab.AddPage("m_dlg0107",&m_dlg0107,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_07);
	m_sub_frame_tab.AddPage("m_dlg0108",&m_dlg0108,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_08);
	m_sub_frame_tab.AddPage("m_dlg0109",&m_dlg0109,IDD_FORM_MAIN_CHILD_DLG12_SUB03_01_09);
	m_sub_frame_tab.Show();
	//
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CFormMainChildDlg12Sub03_01::ImageButton_Initial()
{
	m_11.Initial(TRUE,IDB_BITMAP_10,IDB_BITMAP_11);
	m_12.Initial(FALSE,IDB_BITMAP_20,IDB_BITMAP_21);
	m_13.Initial(FALSE,IDB_BITMAP_30,IDB_BITMAP_31);
	m_14.Initial(FALSE,IDB_BITMAP_40,IDB_BITMAP_41);
	m_15.Initial(FALSE,IDB_BITMAP_50,IDB_BITMAP_51);
	m_16.Initial(FALSE,IDB_BITMAP_60,IDB_BITMAP_61);
	m_17.Initial(FALSE,IDB_BITMAP_70,IDB_BITMAP_71);
	m_18.Initial(FALSE,IDB_BITMAP_80,IDB_BITMAP_81);
	m_19.Initial(FALSE,IDB_BITMAP_90,IDB_BITMAP_91);
}

void CFormMainChildDlg12Sub03_01::ImageButton_AllNormal()
{
	m_11.SetPressed(FALSE);
	m_12.SetPressed(FALSE);
	m_13.SetPressed(FALSE);
	m_14.SetPressed(FALSE);
	m_15.SetPressed(FALSE);
	m_16.SetPressed(FALSE);
	m_17.SetPressed(FALSE);
	m_18.SetPressed(FALSE);
	m_19.SetPressed(FALSE);
}

void CFormMainChildDlg12Sub03_01::OnLButtonDown(UINT nFlags, CPoint point) 
{
	CDialog::OnLButtonDown(nFlags, point);
	PostMessage( WM_NCLBUTTONDOWN, HTCAPTION, MAKELPARAM( point.x, point.y));
}
